Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configd: T6640: enforce in_session returns False under configd #3955

Merged
merged 1 commit into from
Aug 8, 2024

Conversation

jestabro
Copy link
Contributor

@jestabro jestabro commented Aug 7, 2024

Change Summary

Injecting the environment variables needed for avoiding the use of my_set under configd (T6633) causes in_session to return True; we should enforce legacy checks to be consistent with the separation of concerns between the config session and conf_mode script execution.

For this (T6489/T6633) and other extensions as we move towards dropping CStore, in_session should return False if running under configd.

The complex of interactions is described in T6639.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):
    Enforce distinction between configd and config session to allow extensions/alternatives to CStore.

Related Task(s)

Related PR(s)

Component(s) name

Proposed changes

How to test

Smoketest result

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • I have run the components SMOKETESTS if applicable
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

The CStore in_session check is a false positive outside of a config
session if a specific environment variable is set with an existing
referent in unionfs. To allow extensions when running under configd and
avoid confusion, enforce in_session returns False.
@jestabro jestabro self-assigned this Aug 7, 2024
@jestabro jestabro requested a review from a team as a code owner August 7, 2024 13:42
Copy link

github-actions bot commented Aug 7, 2024

👍
No issues in PR Title / Commit Title

@dmbaturin dmbaturin merged commit 7b9d5f0 into vyos:current Aug 8, 2024
13 of 14 checks passed
@jestabro
Copy link
Contributor Author

jestabro commented Aug 8, 2024

@Mergifyio backport circinus

Copy link
Contributor

mergify bot commented Aug 8, 2024

backport circinus

✅ Backports have been created

c-po added a commit that referenced this pull request Aug 12, 2024
configd: T6640: enforce in_session returns False under configd (backport #3955)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

4 participants